﻿using AutoMapper;

namespace ThirdPartyLib.AutoMapperDemo
{
    public static class App
    {
        public static T Convert<T>(object objToConvert)
        {
            if (objToConvert == null) return default(T);
            
            var type = objToConvert.GetType();

            var convertedObject = Mapper.Map<T>(objToConvert);
            return convertedObject;
        }
    }
}